home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The 640 MEG Shareware Studio 2
/
The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO
/
pascal
/
tch_tpas.zip
/
PROG9.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1986-04-05
|
640b
|
26 lines
PROGRAM PROG9;
{$U+ Copyright (C), 1985 by Lyle Faurot. All rights reserved.
New Topics: FOR statement
":n" to specify field width in Write
}
VAR
Low, High, Index : Integer;
BEGIN
Write('Enter a number (may be negative): ');
ReadLn(Low);
Write('Enter a larger number: ');
ReadLn(High);
WriteLn;
WriteLn('Ascending');
FOR Index := Low to High DO
WriteLn(Index:10);
WriteLn('Descending');
FOR Index := High DownTo Low DO
WriteLn(Index:6);
END.